package cn.swu.Waimai.ui.viewModel


import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import androidx.lifecycle.ViewModel
import cn.swu.Waimai.logic.model.UserArgs
import cn.swu.Waimai.logic.repository.Repository

class UserViewModel: ViewModel() {
    

    private val locationLiveData = MutableLiveData<String>()


    // 地址
    val locationData = Transformations.switchMap(locationLiveData){ token ->
        Repository.getLocation(token)
    }

    fun resultLocation(token: String){
        locationLiveData.value = token
    }








}